import {BrowserModule} from '@angular/platform-browser';
import {HttpModule} from '@angular/http';
import {NgModule, ErrorHandler} from '@angular/core';

import {IonicApp, IonicModule, IonicErrorHandler, Nav} from 'ionic-angular';
import {SplashScreen} from '@ionic-native/splash-screen';
import {IonicStorageModule} from '@ionic/storage';
import {StatusBar} from "@ionic-native/status-bar";

import {ConferenceApp} from './app.component';
import {SettingPage} from '../pages/setting/setting';
import {AccountPage} from '../pages/account/account';
import {LoginPage} from '../pages/login/login';
import {PublishPage} from '../pages/publish/publish';
import {HomePage} from '../pages/home/home';
import {TabsPage} from '../pages/tabs/tabs';
import {FeedbackPage} from '../pages/feedback/feedback';

import {UserData} from '../common/user.data';
import {UrlData} from '../common/urldata';
import {Response} from '../common/ServerResponse';
import {RegisterPage} from "../pages/register/register";
import {ArticlePage} from "../pages/article/article";
import {ScheduleFilterPage} from "../pages/article/operator/operator";
import {ArticleFavoritePage} from "../pages/article/favorite/favorite";
import {ExceptionHandler} from "../common/exception.handler";
import {ArticleMyPage} from "../pages/article/myarticle/myarticle";
import {SubjectPage} from "../pages/subject/subject";
import {EnshrineService} from "../service/article/enshrine.service";
import {TutorialPage} from "../pages/tutorial/tutorial";
import {FileService} from "../service/file/file.service";
import {Transfer} from "@ionic-native/transfer";
import {ImagePicker} from "@ionic-native/image-picker";
import {File} from "@ionic-native/file";
import {Device} from "@ionic-native/device";
import {UserInfoPage} from "../pages/userinfo/userinfo";
import {MainPipe} from "./MainPipe";
import {UserService} from "../service/user/user.service";
import {HistoryPage} from "../pages/history/history";
import {MessagePage} from "../pages/message/message";
import {NetSettingPage} from "../pages/netsetting/netsetting";
import {WebViewPage} from "../pages/webview/webview";
import {InAppBrowser} from "._@ionic-native_in-app-browser@3.6.1@@ionic-native/in-app-browser";
import {ThemeableBrowser} from '@ionic-native/themeable-browser';
import {WebViewService} from "../service/webview/webview.service";


@NgModule({
  declarations: [
    ConferenceApp,
    SettingPage,
    AccountPage,
    LoginPage,
    PublishPage,
    HomePage,
    TabsPage,
    FeedbackPage,
    RegisterPage,
    ArticlePage,
    ScheduleFilterPage,
    ArticleFavoritePage,
    ArticleMyPage,
    SubjectPage,
    TutorialPage,
    UserInfoPage,
    HistoryPage,
    MessagePage,
    NetSettingPage,
    WebViewPage,
  ],
  imports: [
    BrowserModule,
    HttpModule,
    MainPipe,
    IonicModule.forRoot(ConferenceApp, {
      tabsHideOnSubPages: 'true'         //隐藏全部子页面tabs
    }),
    IonicStorageModule.forRoot()
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    ConferenceApp,
    SettingPage,
    AccountPage,
    LoginPage,
    PublishPage,
    HomePage,
    TabsPage,
    FeedbackPage,
    RegisterPage,
    ArticlePage,
    ScheduleFilterPage,
    ArticleFavoritePage,
    ArticleMyPage,
    SubjectPage,
    TutorialPage,
    UserInfoPage,
    HistoryPage,
    MessagePage,
    NetSettingPage,
    WebViewPage,
  ],
  providers: [
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    UserData,
    Response,
    SplashScreen,
    UrlData,
    UserService,
    StatusBar,
    Nav,
    ExceptionHandler,
    EnshrineService,
    FileService,
    ImagePicker,
    Transfer,
    File,
    Device,
    InAppBrowser,
    ThemeableBrowser,
    WebViewService,
  ]
})
export class AppModule {
}
